package c.d.a.a.i;

import c.d.a.a.f.b.d;
import c.d.a.a.j.h;
import com.github.mikephil.charting.data.Entry;
import java.util.Objects;

/* compiled from: BarLineScatterCandleBubbleRenderer */
public abstract class b extends c {
    public a f = new a();

    /* compiled from: BarLineScatterCandleBubbleRenderer */
    public class a {
        public int a;
        public int b;
        public int c;

        public void a(c.d.a.a.f.a.a aVar, c.d.a.a.f.b.b bVar) {
            int i;
            Objects.requireNonNull(b.this.b);
            float max = Math.max(0.0f, Math.min(1.0f, 1.0f));
            float lowestVisibleX = aVar.getLowestVisibleX();
            float highestVisibleX = aVar.getHighestVisibleX();
            Entry q = bVar.q(lowestVisibleX, Float.NaN, c.d.a.a.c.e.a.DOWN);
            Entry q2 = bVar.q(highestVisibleX, Float.NaN, c.d.a.a.c.e.a.UP);
            int i2 = 0;
            if (q == null) {
                i = 0;
            } else {
                i = bVar.w(q);
            }
            this.a = i;
            if (q2 != null) {
                i2 = bVar.w(q2);
            }
            this.b = i2;
            this.c = (int) (((float) (i2 - this.a)) * max);
        }
    }

    public b(c.d.a.a.a.a aVar, h hVar) {
        super(aVar, hVar);
    }

    public boolean h(Entry entry, c.d.a.a.f.b.b bVar) {
        if (entry == null) {
            return false;
        }
        float w = (float) bVar.w(entry);
        float i0 = (float) bVar.i0();
        Objects.requireNonNull(this.b);
        if (w >= i0 * 1.0f) {
            return false;
        }
        return true;
    }

    public boolean i(d dVar) {
        return dVar.isVisible() && (dVar.V() || dVar.I());
    }
}
